package ui.actions;

import java.awt.event.ActionEvent;

import javax.swing.AbstractAction;

import ui.Main;
import util.Util;

/**
 * Navigates to the previous page in the history.
 * @author TKington
 *
 */
public class PreviousHistoryAction extends AbstractAction {
	/**
	 * Creates a new PreviousHistoryAction.
	 */
	public PreviousHistoryAction() {
		putValue(NAME, "Back");
		putValue(SHORT_DESCRIPTION, "Go to Previous Page in History");
		//putValue(ACCELERATOR_KEY, KeyStroke.getKeyStroke(KeyEvent.VK_O, ActionEvent.CTRL_MASK));
		putValue(SMALL_ICON, Util.getIcon("Rewind16.gif")); //$NON-NLS-1$
	}
	
	public void actionPerformed(ActionEvent evt) {
		Main.frame.onHistBack();
	}
}
